<!doctype html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport"
        content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">

  <title>Document</title>
</head>
<body>
<div id="app">
  <h1>Hello App!</h1>
  <p>
    <!-- 使用 router-link 组件来导航. -->
    <!-- 通过传入 `to` 属性指定链接. -->
    <!-- <router-link> 默认会被渲染成一个 `<a>` 标签 -->
    <router-link to="/foo">Go to Foo</router-link>
    <router-link to="/demo">Go to Demo</router-link>
    <router-link to="/bar">Go to Bar</router-link>
  </p>
  <p>
    <router-link to="/user/foo">Go to Foo</router-link>
    <router-link to="/user/demo">Go to Demo</router-link>
    <router-link to="/user/bar">Go to Bar</router-link>
  </p>
  <p>
    <router-link to="/user/foo">/user/foo</router-link>
    <router-link to="/user/foo/profile">/user/foo/profile</router-link>
    <router-link to="/user/foo/posts">/user/foo/posts</router-link>
    <router-link to="/user/bar">/user/bar</router-link>
    <router-link to="/user/bar/profile">/user/bar/profile</router-link>
    <router-link to="/user/bar/posts">/user/bar/posts</router-link>
  </p>
  <p>
    <router-link :to="{ name: 'user', params: { id: 123 }}">User</router-link>
  </p>
  <!-- 路由出口 -->
  <!-- 路由匹配到的组件将渲染在这里 -->
  <router-view></router-view>
</div>
<script src="https://unpkg.com/vue/dist/vue.js"></script>
<script src="https://unpkg.com/vue-router/dist/vue-router.js"></script>
<script src="./advace.js"></script>
</body>
</html>
